const Excel = require('exceljs');

let text='hello';
let num=10;
async function start(){
    let workbook = new Excel.Workbook();
    await workbook.xlsx.readFile(__dirname+'/1.xlsx');
    let worksheet = workbook.getWorksheet(1);
    
    let total=worksheet.rowCount;
    let max_insert=Math.ceil(total/num);
    //console.log(total);
    for(let i=1;i<max_insert;i++){
        worksheet.insertRow(num*i+i, [text]);
    }
    worksheet.addRow([text]);
    
    let filename = __dirname + '/new/' + '1.xlsx';
    let r = await workbook.xlsx.writeFile(filename);
    console.log('ok');
}
start();
